<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>登陆</title>
    <link rel="stylesheet" href="../static/layui/css/layui.css">
</head>
<body>
<div class="layui-container" style="width: 100%">
    <div class="layui-row">&nbsp;</div>
    <div class="layui-row">
        <form class="layui-form" action="" method="post" lay-filter="form1">
            <div class="layui-form-item">
                <input type="text" class="layui-input" name="orderTime" placeholder="请输入时间"
                       required lay-verify="required" id="orderTime" autocomplete="off">
            </div>
            <div class="layui-form-item">
                <input type="text" class="layui-input" name="account" placeholder="请输入身份证号"
                       required lay-verify="required">
            </div>
            <div class="layui-form-item">
                <input type="password" class="layui-input" name="password" placeholder="请输入密码"
                       required lay-verify="required">
            </div>
            <div class="layui-form-item" style="text-align: center;">
                <button type="button" lay-submit class="layui-btn" onclick="login()">登陆</button>
            </div>
        </form>
    </div>
</div>
</body>
<script type="text/javascript" src="../static/layui/layui.all.js"></script>
<script type="text/javascript" src="../static/config.js"></script>
<script type="text/javascript">
    const $ = layui.$;
    const element = layui.element;
    const layer = layui.layer;
    const form = layui.form;
    const laydate = layui.laydate;
    const table = layui.table;

    laydate.render({
        elem: '#orderTime',
        position: 'fixed',
        min: 0
    });

    function login() {
        const data1 = form.val("form1");
        const obj = getUrlParams();
        data1.doctorId = obj.doctorId;
        $.post({
            url: baseUrl + "/hospital-web/process/createOrder",
            contentType: "application/json",
            dataType: "json",
            data: JSON.stringify(data1),
            success: function (res) {
                console.log(res);
                parent.layer.msg(res.msg);
                if (res.msg.indexOf('成功') >= 0) {
                    //关闭
                    const index = parent.layer.getFrameIndex(window.name);
                    parent.layer.close(index);
                }
            }
        });


    }
</script>
</html>